Abstract

This script using qiime2R package to visualize Qiime2 artifacts (.qza files) and do post Qiime2 analysis, including ploting PCoA, drawing taxa heatmap and barplot, differential abundance analysis, ploting phylogenetic tree etc.

Load qiime2 artifacts and metadata

proj = "Jenny_16SrRNA_20220106"
# read feature table
ASVs <- read_qza(paste0("asv/dada2/", proj, "-asv-table.qza"))
cat("# Show 5 samples and first 5 taxa:\n")
## # Show 5 samples and first 5 taxa:
ASVs$data[1:5,6:10]
##                                  Noto.14.10G Noto.14.11F Noto.14.11G
## 3ccdc88a8737c3ac98bd0a40b1b93bf8           0        4900         256
## 35f3ce6a0ee2829e6ccb193be3c4338b           0       10059         245
## 1930d2ae4018583d606e705beea31bd1          19        1704         432
## 5292f29cab69c370997bcb039ef68d64           0         385          26
## df0e3d38eec730326754d8c17a8b8efe        1011        2904        2850
##                                  Noto.14.12F Noto.14.12G
## 3ccdc88a8737c3ac98bd0a40b1b93bf8        1084        1550
## 35f3ce6a0ee2829e6ccb193be3c4338b        2865         556
## 1930d2ae4018583d606e705beea31bd1         529        2319
## 5292f29cab69c370997bcb039ef68d64          77         210
## df0e3d38eec730326754d8c17a8b8efe         623        3592
# read metadata
metadata <- read_q2metadata(paste0("../", proj, "_metadata.tsv"))
# samples are removed due to low abundance
rmsamples <- c(
'Noto.16.18G', 
'Noto.16.9G',
'Noto.16.14G',
'Noto.16.1G',
'Noto.14.26G',
'Noto.14.4G',
'Noto.14.2G',
'Noto.16.12G',
'Noto.16.13G',
'Noto.16.3G',
'DNAfreewater3.20211116',
'Extractemptywell3.20211116',
'Noto.14.22G',
'Noto.16.20G')
metadata <- metadata %>% filter(!SampleID %in% rmsamples)


cat("# Here is what metadata looks like:\n")
## # Here is what metadata looks like:
head(metadata)
##     SampleID    Sample_type Mouse_background  Infection
## 1 Noto.14.1G gastric tissue             FVBN Uninfected
## 2 Noto.14.3G gastric tissue             FVBN Uninfected
## 3 Noto.14.5G gastric tissue             FVBN Uninfected
## 4 Noto.14.6G gastric tissue             FVBN Uninfected
## 5 Noto.14.7G gastric tissue             FVBN Uninfected
## 6 Noto.14.8G gastric tissue             FVBN Uninfected
##                Diet_Or_Water_treatment H. pylori_colonization
## 1 PicoLab Rodent Diet 5L0D* (standard)               negative
## 2 PicoLab Rodent Diet 5L0D* (standard)               negative
## 3 PicoLab Rodent Diet 5L0D* (standard)               negative
## 4 PicoLab Rodent Diet 5L0D* (standard)               negative
## 5 PicoLab Rodent Diet 5L0D* (standard)               negative
## 6 PicoLab Rodent Diet 5L0D* (standard)               negative
##   Inflammation_Score(0-12)
## 1                        0
## 2                        0
## 3                        0
## 4                        0
## 5                        0
## 6                        0
# read taxonomy
taxonomy <- read_qza(paste0("asv/taxonomy/", proj, "-taxonomy.qza"))
taxonomy <- parse_taxonomy(taxonomy$data)
cat("# Taxonomy assignment:\n")
## # Taxonomy assignment:
head(taxonomy)
##                                   Kingdom        Phylum       Class
## 3ccdc88a8737c3ac98bd0a40b1b93bf8 Bacteria Bacteroidetes Bacteroidia
## 35f3ce6a0ee2829e6ccb193be3c4338b Bacteria   Tenericutes  Mollicutes
## 1930d2ae4018583d606e705beea31bd1 Bacteria Bacteroidetes Bacteroidia
## 5292f29cab69c370997bcb039ef68d64 Bacteria Bacteroidetes Bacteroidia
## df0e3d38eec730326754d8c17a8b8efe Bacteria    Firmicutes     Bacilli
## 0df6c802966e8670279671824da4f10a Bacteria    Firmicutes     Bacilli
##                                              Order             Family
## 3ccdc88a8737c3ac98bd0a40b1b93bf8     Bacteroidales      Rikenellaceae
## 35f3ce6a0ee2829e6ccb193be3c4338b Anaeroplasmatales Anaeroplasmataceae
## 1930d2ae4018583d606e705beea31bd1     Bacteroidales              S24-7
## 5292f29cab69c370997bcb039ef68d64     Bacteroidales     Bacteroidaceae
## df0e3d38eec730326754d8c17a8b8efe  Turicibacterales  Turicibacteraceae
## 0df6c802966e8670279671824da4f10a   Lactobacillales   Lactobacillaceae
##                                          Genus Species
## 3ccdc88a8737c3ac98bd0a40b1b93bf8          <NA>    <NA>
## 35f3ce6a0ee2829e6ccb193be3c4338b  Anaeroplasma    <NA>
## 1930d2ae4018583d606e705beea31bd1          <NA>    <NA>
## 5292f29cab69c370997bcb039ef68d64   Bacteroides    <NA>
## df0e3d38eec730326754d8c17a8b8efe  Turicibacter    <NA>
## 0df6c802966e8670279671824da4f10a Lactobacillus    <NA>
# create Phyloseq object
# physeq<-qza_to_phyloseq(
#     features=paste0("asv/dada2/", proj, "-asv-table.qza"),
#     tree=paste0("asv/phylogeny/", proj, "-rooted_tree.qza"),
#     taxonomy=paste0("asv/taxonomy/", proj, "-taxonomy.qza"),
#     metadata = paste0("../", proj, "_metadata.tsv")
#     )
# cat("# create a Phyloseq object, which includes the following stuffs: \n
#     (OTU table is actually ASV table when you do ASV) \n")
# physeq

Post-Qiime2 analysis - Visualizations

  • Alpha diversity between subgroups
shannon <- read_qza(paste0("asv/diversity/core-metrics-results/", proj, "-shannon-vector.qza"))
shannon <- shannon$data %>% rownames_to_column("SampleID")
metadata <- metadata %>% left_join(shannon)
head(metadata)
##     SampleID    Sample_type Mouse_background  Infection
## 1 Noto.14.1G gastric tissue             FVBN Uninfected
## 2 Noto.14.3G gastric tissue             FVBN Uninfected
## 3 Noto.14.5G gastric tissue             FVBN Uninfected
## 4 Noto.14.6G gastric tissue             FVBN Uninfected
## 5 Noto.14.7G gastric tissue             FVBN Uninfected
## 6 Noto.14.8G gastric tissue             FVBN Uninfected
##                Diet_Or_Water_treatment H. pylori_colonization
## 1 PicoLab Rodent Diet 5L0D* (standard)               negative
## 2 PicoLab Rodent Diet 5L0D* (standard)               negative
## 3 PicoLab Rodent Diet 5L0D* (standard)               negative
## 4 PicoLab Rodent Diet 5L0D* (standard)               negative
## 5 PicoLab Rodent Diet 5L0D* (standard)               negative
## 6 PicoLab Rodent Diet 5L0D* (standard)               negative
##   Inflammation_Score(0-12)  shannon
## 1                        0 2.198340
## 2                        0 2.283360
## 3                        0 1.829425
## 4                        0 2.490648
## 5                        0 2.207579
## 6                        0 2.039649
  • Boxplots for each comparison in Fecal samples:
    • #1 b.compare 14.1 F-14.9 F (uninfected WT FVBN mice) vs. 14.10 F-14.14 F (uninfected INS-GAS mice with gastrin transgene)
    • #2 b.compare 14.15 F-14.19 F (uninfected INS-GAS mice on iron-replete diet) vs. 14.20 F-14.26 F (uninfected INS-GAS mice on iron-depleted diet).
    • #3 b.compare 16.1 F – 16.5 F (uninfected INS-GAS mice given water alone) vs. 16.6 F – 16.10 F (uninfected INS-GAS mice given water supplemented with 100 uM DCA).
    • #4 c.compare 16.1 F – 16.5 F (uninfected INS-GAS mice given water alone) vs. 16.11 F – 16.15 F (H. pylori infected INS-GAS mice given water alone)
    • #4 d.compare 16.6 F- 16.10 F (uninfected INS-GAS mice give water supplemented with 100 uM DCA) vs. 16.16 F – 16.20 F (H. pylori infected INS-GAS mice give water supplemented with 100 uM DCA).
# plot each comparison and do t-test
Fcomp1 <- metadata %>% filter(Sample_type=='fecal pellet' & Diet_Or_Water_treatment=='PicoLab Rodent Diet 5L0D* (standard)')
t_pvalue1 <- paste0("#1b. t-test pvalue: ", t.test(shannon ~ Mouse_background, data=Fcomp1)$p.value, "\n")

Fcomp1
##       SampleID  Sample_type Mouse_background  Infection
## 1   Noto.14.1F fecal pellet             FVBN Uninfected
## 2   Noto.14.2F fecal pellet             FVBN Uninfected
## 3   Noto.14.3F fecal pellet             FVBN Uninfected
## 4   Noto.14.4F fecal pellet             FVBN Uninfected
## 5   Noto.14.5F fecal pellet             FVBN Uninfected
## 6   Noto.14.6F fecal pellet             FVBN Uninfected
## 7   Noto.14.7F fecal pellet             FVBN Uninfected
## 8   Noto.14.8F fecal pellet             FVBN Uninfected
## 9   Noto.14.9F fecal pellet             FVBN Uninfected
## 10 Noto.14.10F fecal pellet          INS-GAS Uninfected
## 11 Noto.14.11F fecal pellet          INS-GAS Uninfected
## 12 Noto.14.12F fecal pellet          INS-GAS Uninfected
## 13 Noto.14.13F fecal pellet          INS-GAS Uninfected
## 14 Noto.14.14F fecal pellet          INS-GAS Uninfected
##                 Diet_Or_Water_treatment H. pylori_colonization
## 1  PicoLab Rodent Diet 5L0D* (standard)                   <NA>
## 2  PicoLab Rodent Diet 5L0D* (standard)                   <NA>
## 3  PicoLab Rodent Diet 5L0D* (standard)                   <NA>
## 4  PicoLab Rodent Diet 5L0D* (standard)                   <NA>
## 5  PicoLab Rodent Diet 5L0D* (standard)                   <NA>
## 6  PicoLab Rodent Diet 5L0D* (standard)                   <NA>
## 7  PicoLab Rodent Diet 5L0D* (standard)                   <NA>
## 8  PicoLab Rodent Diet 5L0D* (standard)                   <NA>
## 9  PicoLab Rodent Diet 5L0D* (standard)                   <NA>
## 10 PicoLab Rodent Diet 5L0D* (standard)                   <NA>
## 11 PicoLab Rodent Diet 5L0D* (standard)                   <NA>
## 12 PicoLab Rodent Diet 5L0D* (standard)                   <NA>
## 13 PicoLab Rodent Diet 5L0D* (standard)                   <NA>
## 14 PicoLab Rodent Diet 5L0D* (standard)                   <NA>
##    Inflammation_Score(0-12)  shannon
## 1                      <NA> 5.744005
## 2                      <NA> 5.687151
## 3                      <NA> 5.033283
## 4                      <NA> 5.510055
## 5                      <NA> 5.800220
## 6                      <NA> 5.893487
## 7                      <NA> 6.067828
## 8                      <NA> 6.054099
## 9                      <NA> 6.400792
## 10                     <NA> 6.196199
## 11                     <NA> 5.899325
## 12                     <NA> 5.435134
## 13                     <NA> 6.385310
## 14                     <NA> 6.186501
# pdf("Shannon_diversity_comparisons_Fecal.pdf", 2.5, 5)
Fcomp1 %>% ggplot(aes(x=Mouse_background, y=shannon, fill=Mouse_background)) +
  stat_summary(geom="bar", fun.data=mean_se, color="black") +
  geom_jitter(shape=21, width=0.2, height=0, size = 3, color="red")+
  theme_classic() +
  theme(legend.position = "none", text = element_text(family = "Helvetica")) + 
  scale_fill_manual(values = c("black", "darkgrey")) +
  ylab("Shannon diversity") +
  xlab("Mouse background")

Fcomp2 <- metadata %>% filter(Sample_type=='fecal pellet' & grepl('TestDiet', Diet_Or_Water_treatment))
t_pvalue2 <- paste0("#2b. t-test pvalue: ", t.test(shannon ~ Diet_Or_Water_treatment, data=Fcomp2)$p.value, "\n")
Fcomp2 <- Fcomp2 %>% dplyr::mutate(Diet_Or_Water_treatment = str_split(Diet_Or_Water_treatment, " ", simplify=TRUE)[ ,3]) 
Fcomp2$Diet_Or_Water_treatment <- factor(Fcomp2$Diet_Or_Water_treatment, levels=c("Iron-replete", "Iron-depleted"))

Fcomp2
##       SampleID  Sample_type Mouse_background  Infection Diet_Or_Water_treatment
## 1  Noto.14.15F fecal pellet          INS-GAS Uninfected            Iron-replete
## 2  Noto.14.16F fecal pellet          INS-GAS Uninfected            Iron-replete
## 3  Noto.14.17F fecal pellet          INS-GAS Uninfected            Iron-replete
## 4  Noto.14.18F fecal pellet          INS-GAS Uninfected            Iron-replete
## 5  Noto.14.19F fecal pellet          INS-GAS Uninfected            Iron-replete
## 6  Noto.14.20F fecal pellet          INS-GAS Uninfected           Iron-depleted
## 7  Noto.14.21F fecal pellet          INS-GAS Uninfected           Iron-depleted
## 8  Noto.14.22F fecal pellet          INS-GAS Uninfected           Iron-depleted
## 9  Noto.14.23F fecal pellet          INS-GAS Uninfected           Iron-depleted
## 10 Noto.14.24F fecal pellet          INS-GAS Uninfected           Iron-depleted
## 11 Noto.14.25F fecal pellet          INS-GAS Uninfected           Iron-depleted
## 12 Noto.14.26F fecal pellet          INS-GAS Uninfected           Iron-depleted
##    H. pylori_colonization Inflammation_Score(0-12)  shannon
## 1                    <NA>                     <NA> 3.912590
## 2                    <NA>                     <NA> 4.267224
## 3                    <NA>                     <NA> 4.312662
## 4                    <NA>                     <NA> 4.455727
## 5                    <NA>                     <NA> 4.703006
## 6                    <NA>                     <NA> 4.436776
## 7                    <NA>                     <NA> 4.804841
## 8                    <NA>                     <NA> 4.990394
## 9                    <NA>                     <NA> 4.652954
## 10                   <NA>                     <NA> 4.316602
## 11                   <NA>                     <NA> 4.246618
## 12                   <NA>                     <NA> 4.288628
Fcomp2 %>% ggplot(aes(x=Diet_Or_Water_treatment, y=shannon, fill=Diet_Or_Water_treatment)) +
  stat_summary(geom="bar", fun.data=mean_se, color="black") +
  geom_jitter(shape=21, width=0.2, height=0, size = 3, color="red")+
  theme_classic() +
  theme(legend.position = "none", text = element_text(family = "Helvetica")) + 
  scale_fill_manual(values = c("black", "darkgrey")) +
  ylab("Shannon diversity") + 
  xlab("Iron supply")

Fcomp3 <- metadata %>% filter(Sample_type=='fecal pellet' & grepl('H20', Diet_Or_Water_treatment) & Infection=="Uninfected")
t_pvalue3 <- paste0("#3b. t-test pvalue: ", t.test(shannon ~ Diet_Or_Water_treatment, data=Fcomp3)$p.value, "\n")

Fcomp3
##       SampleID  Sample_type Mouse_background  Infection Diet_Or_Water_treatment
## 1   Noto.16.1F fecal pellet          INS-GAS Uninfected                     H20
## 2   Noto.16.2F fecal pellet          INS-GAS Uninfected                     H20
## 3   Noto.16.3F fecal pellet          INS-GAS Uninfected                     H20
## 4   Noto.16.4F fecal pellet          INS-GAS Uninfected                     H20
## 5   Noto.16.5F fecal pellet          INS-GAS Uninfected                     H20
## 6   Noto.16.6F fecal pellet          INS-GAS Uninfected       100 mM DCA in H20
## 7   Noto.16.7F fecal pellet          INS-GAS Uninfected       100 mM DCA in H20
## 8   Noto.16.8F fecal pellet          INS-GAS Uninfected       100 mM DCA in H20
## 9   Noto.16.9F fecal pellet          INS-GAS Uninfected       100 mM DCA in H20
## 10 Noto.16.10F fecal pellet          INS-GAS Uninfected       100 mM DCA in H20
##    H. pylori_colonization Inflammation_Score(0-12)  shannon
## 1                    <NA>                     <NA> 5.510795
## 2                    <NA>                     <NA> 5.611329
## 3                    <NA>                     <NA> 5.646711
## 4                    <NA>                     <NA> 5.922997
## 5                    <NA>                     <NA> 5.835692
## 6                    <NA>                     <NA> 5.752106
## 7                    <NA>                     <NA> 5.189827
## 8                    <NA>                     <NA> 5.233659
## 9                    <NA>                     <NA> 5.630338
## 10                   <NA>                     <NA> 5.208054
Fcomp3 %>% ggplot(aes(x=Diet_Or_Water_treatment, y=shannon, fill=Diet_Or_Water_treatment)) +
  stat_summary(geom="bar", fun.data=mean_se, color="black") +
  geom_jitter(shape=21, width=0.2, height=0, size = 3, color="red")+
  theme_classic() +
  theme(legend.position = "none", text = element_text(family = "Helvetica")) + 
  scale_fill_manual(values = c("black", "darkgrey")) +
  ylab("Shannon diversity") +
  xlab("Water supply")

Fcomp4 <- metadata %>% filter(Sample_type=='fecal pellet' & grepl('^H20', Diet_Or_Water_treatment))
t_pvalue4 <- paste0("#4c. t-test pvalue: ", t.test(shannon ~ Infection, data=Fcomp4)$p.value, "\n")

Fcomp4
##       SampleID  Sample_type Mouse_background       Infection
## 1   Noto.16.1F fecal pellet          INS-GAS      Uninfected
## 2   Noto.16.2F fecal pellet          INS-GAS      Uninfected
## 3   Noto.16.3F fecal pellet          INS-GAS      Uninfected
## 4   Noto.16.4F fecal pellet          INS-GAS      Uninfected
## 5   Noto.16.5F fecal pellet          INS-GAS      Uninfected
## 6  Noto.16.11F fecal pellet          INS-GAS H. pylori PMSS1
## 7  Noto.16.12F fecal pellet          INS-GAS H. pylori PMSS1
## 8  Noto.16.13F fecal pellet          INS-GAS H. pylori PMSS1
## 9  Noto.16.14F fecal pellet          INS-GAS H. pylori PMSS1
## 10 Noto.16.15F fecal pellet          INS-GAS H. pylori PMSS1
##    Diet_Or_Water_treatment H. pylori_colonization Inflammation_Score(0-12)
## 1                      H20                   <NA>                     <NA>
## 2                      H20                   <NA>                     <NA>
## 3                      H20                   <NA>                     <NA>
## 4                      H20                   <NA>                     <NA>
## 5                      H20                   <NA>                     <NA>
## 6                      H20                   <NA>                     <NA>
## 7                      H20                   <NA>                     <NA>
## 8                      H20                   <NA>                     <NA>
## 9                      H20                   <NA>                     <NA>
## 10                     H20                   <NA>                     <NA>
##     shannon
## 1  5.510795
## 2  5.611329
## 3  5.646711
## 4  5.922997
## 5  5.835692
## 6  5.740818
## 7  5.572455
## 8  5.568770
## 9  5.502304
## 10 5.182336
Fcomp4 %>% ggplot(aes(x=Infection, y=shannon, fill=Infection)) +
  stat_summary(geom="bar", fun.data=mean_se, color="black") +
  geom_jitter(shape=21, width=0.2, height=0, size = 3, color="red")+
  theme_classic() +
  theme(legend.position = "none", text = element_text(family = "Helvetica")) + 
  scale_fill_manual(values = c("black", "darkgrey")) +
  ylab("Shannon diversity") +
  xlab("Infection")

Fcomp5 <- metadata %>% filter(Sample_type=='fecal pellet' & grepl('DCA', Diet_Or_Water_treatment))
t_pvalue5 <- paste0("#4d. t-test pvalue: ", t.test(shannon ~ Infection, data=Fcomp5)$p.value, "\n")

Fcomp5
##       SampleID  Sample_type Mouse_background       Infection
## 1   Noto.16.6F fecal pellet          INS-GAS      Uninfected
## 2   Noto.16.7F fecal pellet          INS-GAS      Uninfected
## 3   Noto.16.8F fecal pellet          INS-GAS      Uninfected
## 4   Noto.16.9F fecal pellet          INS-GAS      Uninfected
## 5  Noto.16.10F fecal pellet          INS-GAS      Uninfected
## 6  Noto.16.16F fecal pellet          INS-GAS H. pylori PMSS1
## 7  Noto.16.17F fecal pellet          INS-GAS H. pylori PMSS1
## 8  Noto.16.18F fecal pellet          INS-GAS H. pylori PMSS1
## 9  Noto.16.19F fecal pellet          INS-GAS H. pylori PMSS1
## 10 Noto.16.20F fecal pellet          INS-GAS H. pylori PMSS1
##    Diet_Or_Water_treatment H. pylori_colonization Inflammation_Score(0-12)
## 1        100 mM DCA in H20                   <NA>                     <NA>
## 2        100 mM DCA in H20                   <NA>                     <NA>
## 3        100 mM DCA in H20                   <NA>                     <NA>
## 4        100 mM DCA in H20                   <NA>                     <NA>
## 5        100 mM DCA in H20                   <NA>                     <NA>
## 6        100 mM DCA in H20                   <NA>                     <NA>
## 7        100 mM DCA in H20                   <NA>                     <NA>
## 8        100 mM DCA in H20                   <NA>                     <NA>
## 9        100 mM DCA in H20                   <NA>                     <NA>
## 10       100 mM DCA in H20                   <NA>                     <NA>
##     shannon
## 1  5.752106
## 2  5.189827
## 3  5.233659
## 4  5.630338
## 5  5.208054
## 6  6.025388
## 7  5.513765
## 8  5.862775
## 9  5.714661
## 10 5.233691
Fcomp5 %>% ggplot(aes(x=Infection, y=shannon, fill=Infection)) +
  stat_summary(geom="bar", fun.data=mean_se, color="black") +
  geom_jitter(shape=21, width=0.2, height=0, size = 3, color="red")+
  theme_classic() +
  theme(legend.position = "none", text = element_text(family = "Helvetica")) + 
  scale_fill_manual(values = c("black", "darkgrey")) +
  ylab("Shannon diversity") +
  xlab("Infection")

# dev.off()
cat(t_pvalue1, t_pvalue2, t_pvalue3, t_pvalue4, t_pvalue5)
## #1b. t-test pvalue: 0.319522057532681
##  #2b. t-test pvalue: 0.259171096086067
##  #3b. t-test pvalue: 0.0710030837086846
##  #4c. t-test pvalue: 0.145904134898372
##  #4d. t-test pvalue: 0.181916682303912
  • Boxplots for each comparison in Gatric samples:
    • #1 a.compare 14.1 G-14.9 G (uninfected WT FVBN mice) vs. 14.10 G-14.14 G (uninfected INS-GAS mice with gastrin transgene).
    • #2 a.compare 14.15 G-14.19 G (uninfected INS-GAS mice on iron-replete diet) vs. 14.20 G-14.26 G (uninfected INS-GAS mice on iron-depleted diet).
    • #3 a.compare 16.1 G – 16.5 G (uninfected INS-GAS mice given water alone) vs. 16.6 G – 16.10 G (uninfected INS-GAS mice give water supplemented with 100 uM DCA).
    • #4 a.compare 16.1 G – 16.5 G (uninfected INS-GAS mice given water alone) vs. 16.11 G – 16.15 G (H. pylori infected INS-GAS mice given water alone)
    • #4 b.compare 16.6 G- 16.10 G (uninfected INS-GAS mice give water supplemented with 100 uM DCA) vs. 16.16 G – 16.20 G (H. pylori infected INS-GAS mice give water supplemented with 100 uM DCA).
# plot each comparison and do t-test

Gcomp1 <- metadata %>% filter(Sample_type=='gastric tissue' & Diet_Or_Water_treatment=='PicoLab Rodent Diet 5L0D* (standard)')
t_pvalue1 <- paste0("#1a. t-test pvalue: ", t.test(shannon ~ Mouse_background, data=Gcomp1)$p.value, "\n")

# pdf("Shannon_diversity_comparisons_Gastric.pdf", 2.5, 5)
Gcomp1
##       SampleID    Sample_type Mouse_background  Infection
## 1   Noto.14.1G gastric tissue             FVBN Uninfected
## 2   Noto.14.3G gastric tissue             FVBN Uninfected
## 3   Noto.14.5G gastric tissue             FVBN Uninfected
## 4   Noto.14.6G gastric tissue             FVBN Uninfected
## 5   Noto.14.7G gastric tissue             FVBN Uninfected
## 6   Noto.14.8G gastric tissue             FVBN Uninfected
## 7   Noto.14.9G gastric tissue             FVBN Uninfected
## 8  Noto.14.10G gastric tissue          INS-GAS Uninfected
## 9  Noto.14.11G gastric tissue          INS-GAS Uninfected
## 10 Noto.14.12G gastric tissue          INS-GAS Uninfected
## 11 Noto.14.13G gastric tissue          INS-GAS Uninfected
## 12 Noto.14.14G gastric tissue          INS-GAS Uninfected
##                 Diet_Or_Water_treatment H. pylori_colonization
## 1  PicoLab Rodent Diet 5L0D* (standard)               negative
## 2  PicoLab Rodent Diet 5L0D* (standard)               negative
## 3  PicoLab Rodent Diet 5L0D* (standard)               negative
## 4  PicoLab Rodent Diet 5L0D* (standard)               negative
## 5  PicoLab Rodent Diet 5L0D* (standard)               negative
## 6  PicoLab Rodent Diet 5L0D* (standard)               negative
## 7  PicoLab Rodent Diet 5L0D* (standard)               negative
## 8  PicoLab Rodent Diet 5L0D* (standard)               negative
## 9  PicoLab Rodent Diet 5L0D* (standard)               negative
## 10 PicoLab Rodent Diet 5L0D* (standard)               negative
## 11 PicoLab Rodent Diet 5L0D* (standard)               negative
## 12 PicoLab Rodent Diet 5L0D* (standard)               negative
##    Inflammation_Score(0-12)  shannon
## 1                         0 2.198340
## 2                         0 2.283360
## 3                         0 1.829425
## 4                         0 2.490648
## 5                         0 2.207579
## 6                         0 2.039649
## 7                       0.5 2.208223
## 8                         0 2.175170
## 9                         0 5.412382
## 10                        0 5.456346
## 11                        0 4.203536
## 12                        0 1.898425
Gcomp1 %>% ggplot(aes(x=Mouse_background, y=shannon, fill=Mouse_background)) +
  stat_summary(geom="bar", fun.data=mean_se, color="black") +
  geom_jitter(shape=21, width=0.2, height=0, size = 3, color="red")+
  theme_classic() +
  theme(legend.position = "none", text = element_text(family = "Helvetica")) + 
  scale_fill_manual(values = c("black", "darkgrey")) +
  ylab("Shannon diversity") +
  xlab("Mouse background")

Gcomp2 <- metadata %>% filter(Sample_type=='gastric tissue' & grepl('TestDiet', Diet_Or_Water_treatment))
t_pvalue2 <- paste0("#2a. t-test pvalue: ", t.test(shannon ~ Diet_Or_Water_treatment, data=Gcomp2)$p.value, "\n")
Gcomp2 <- Gcomp2 %>% dplyr::mutate(Diet_Or_Water_treatment = str_split(Diet_Or_Water_treatment, " ", simplify=TRUE)[ ,3])
Gcomp2$Diet_Or_Water_treatment <- factor(Gcomp2$Diet_Or_Water_treatment, levels=c("Iron-replete", "Iron-depleted"))

Gcomp2
##       SampleID    Sample_type Mouse_background  Infection
## 1  Noto.14.15G gastric tissue          INS-GAS Uninfected
## 2  Noto.14.16G gastric tissue          INS-GAS Uninfected
## 3  Noto.14.17G gastric tissue          INS-GAS Uninfected
## 4  Noto.14.18G gastric tissue          INS-GAS Uninfected
## 5  Noto.14.19G gastric tissue          INS-GAS Uninfected
## 6  Noto.14.20G gastric tissue          INS-GAS Uninfected
## 7  Noto.14.21G gastric tissue          INS-GAS Uninfected
## 8  Noto.14.23G gastric tissue          INS-GAS Uninfected
## 9  Noto.14.24G gastric tissue          INS-GAS Uninfected
## 10 Noto.14.25G gastric tissue          INS-GAS Uninfected
##    Diet_Or_Water_treatment H. pylori_colonization Inflammation_Score(0-12)
## 1             Iron-replete               negative                        0
## 2             Iron-replete               negative                        0
## 3             Iron-replete               negative                        0
## 4             Iron-replete               negative                        0
## 5             Iron-replete               negative                        0
## 6            Iron-depleted               negative                        0
## 7            Iron-depleted               negative                        0
## 8            Iron-depleted               negative                        0
## 9            Iron-depleted               negative                      0.5
## 10           Iron-depleted               negative                        0
##     shannon
## 1  2.805109
## 2  2.890866
## 3  2.927809
## 4  1.914683
## 5  2.000384
## 6  2.018251
## 7  1.562809
## 8  4.143961
## 9  2.352939
## 10 4.711281
Gcomp2 %>% ggplot(aes(x=Diet_Or_Water_treatment, y=shannon, fill=Diet_Or_Water_treatment)) +
  stat_summary(geom="bar", fun.data=mean_se, color="black") +
  geom_jitter(shape=21, width=0.2, height=0, size = 3, color="red")+
  theme_classic() +
  theme(legend.position = "none", text = element_text(family = "Helvetica")) + 
  scale_fill_manual(values = c("black", "darkgrey")) +
  ylab("Shannon diversity") +
  xlab("Iron supply")

Gcomp3 <- metadata %>% filter(Sample_type=='gastric tissue' & grepl('H20', Diet_Or_Water_treatment) & Infection=="Uninfected")
t_pvalue3 <- paste0("#3a. t-test pvalue: ", t.test(shannon ~ Diet_Or_Water_treatment, data=Gcomp3)$p.value, "\n")

Gcomp3
##      SampleID    Sample_type Mouse_background  Infection
## 1  Noto.16.2G gastric tissue          INS-GAS Uninfected
## 2  Noto.16.4G gastric tissue          INS-GAS Uninfected
## 3  Noto.16.5G gastric tissue          INS-GAS Uninfected
## 4  Noto.16.6G gastric tissue          INS-GAS Uninfected
## 5  Noto.16.7G gastric tissue          INS-GAS Uninfected
## 6  Noto.16.8G gastric tissue          INS-GAS Uninfected
## 7 Noto.16.10G gastric tissue          INS-GAS Uninfected
##   Diet_Or_Water_treatment H. pylori_colonization Inflammation_Score(0-12)
## 1                     H20               negative                  pending
## 2                     H20               negative                  pending
## 3                     H20               negative                  pending
## 4       100 mM DCA in H20               negative                  pending
## 5       100 mM DCA in H20               negative                  pending
## 6       100 mM DCA in H20               negative                  pending
## 7       100 mM DCA in H20               negative                  pending
##    shannon
## 1 3.905627
## 2 4.696699
## 3 1.428787
## 4 1.420909
## 5 1.554961
## 6 1.529912
## 7 1.327314
Gcomp3 %>% ggplot(aes(x=Diet_Or_Water_treatment, y=shannon, fill=Diet_Or_Water_treatment)) +
  stat_summary(geom="bar", fun.data=mean_se, color="black") +
  geom_jitter(shape=21, width=0.2, height=0, size = 3, color="red")+
  theme_classic() +
  theme(legend.position = "none", text = element_text(family = "Helvetica")) + 
  scale_fill_manual(values = c("black", "darkgrey")) +
  ylab("Shannon diversity") +
  xlab("Water supply")

Gcomp4 <- metadata %>% filter(Sample_type=='gastric tissue' & grepl('^H20', Diet_Or_Water_treatment))
t_pvalue4 <- paste0("#4a. t-test pvalue: ", t.test(shannon ~ Infection, data=Gcomp4)$p.value, "\n")

Gcomp4
##      SampleID    Sample_type Mouse_background       Infection
## 1  Noto.16.2G gastric tissue          INS-GAS      Uninfected
## 2  Noto.16.4G gastric tissue          INS-GAS      Uninfected
## 3  Noto.16.5G gastric tissue          INS-GAS      Uninfected
## 4 Noto.16.11G gastric tissue          INS-GAS H. pylori PMSS1
## 5 Noto.16.15G gastric tissue          INS-GAS H. pylori PMSS1
##   Diet_Or_Water_treatment       H. pylori_colonization Inflammation_Score(0-12)
## 1                     H20                     negative                  pending
## 2                     H20                     negative                  pending
## 3                     H20                     negative                  pending
## 4                     H20 below the limit of detection                  pending
## 5                     H20                  84000 CFU/g                  pending
##    shannon
## 1 3.905627
## 2 4.696699
## 3 1.428787
## 4 1.211462
## 5 1.427284
Gcomp4 %>% ggplot(aes(x=Infection, y=shannon, fill=Infection)) +
  stat_summary(geom="bar", fun.data=mean_se, color="black") +
  geom_jitter(shape=21, width=0.2, height=0, size = 3, color="red")+
  theme_classic() +
  theme(legend.position = "none", text = element_text(family = "Helvetica")) + 
  scale_fill_manual(values = c("black", "darkgrey")) +
  ylab("Shannon diversity") +
  xlab("Infection")

Gcomp5 <- metadata %>% filter(Sample_type=='gastric tissue' & grepl('DCA', Diet_Or_Water_treatment))
t_pvalue5 <- paste0("#4b. t-test pvalue: ", t.test(shannon ~ Infection, data=Gcomp5)$p.value, "\n")

Gcomp5
##      SampleID    Sample_type Mouse_background       Infection
## 1  Noto.16.6G gastric tissue          INS-GAS      Uninfected
## 2  Noto.16.7G gastric tissue          INS-GAS      Uninfected
## 3  Noto.16.8G gastric tissue          INS-GAS      Uninfected
## 4 Noto.16.10G gastric tissue          INS-GAS      Uninfected
## 5 Noto.16.16G gastric tissue          INS-GAS H. pylori PMSS1
## 6 Noto.16.17G gastric tissue          INS-GAS H. pylori PMSS1
## 7 Noto.16.19G gastric tissue          INS-GAS H. pylori PMSS1
##   Diet_Or_Water_treatment       H. pylori_colonization Inflammation_Score(0-12)
## 1       100 mM DCA in H20                     negative                  pending
## 2       100 mM DCA in H20                     negative                  pending
## 3       100 mM DCA in H20                     negative                  pending
## 4       100 mM DCA in H20                     negative                  pending
## 5       100 mM DCA in H20 below the limit of detection                  pending
## 6       100 mM DCA in H20 below the limit of detection                  pending
## 7       100 mM DCA in H20                   7143 CFU/g                  pending
##    shannon
## 1 1.420909
## 2 1.554961
## 3 1.529912
## 4 1.327314
## 5 3.798749
## 6 5.713245
## 7 4.289579
Gcomp5 %>% ggplot(aes(x=Infection, y=shannon, fill=Infection)) +
  stat_summary(geom="bar", fun.data=mean_se, color="black") +
  geom_jitter(shape=21, width=0.2, height=0, size = 3, color="red")+
  theme_classic() +
  theme(legend.position = "none", text = element_text(family = "Helvetica")) + 
  scale_fill_manual(values = c("black", "darkgrey")) +
  ylab("Shannon diversity") +
  xlab("Infection")

# dev.off()
cat(t_pvalue1, t_pvalue2, t_pvalue3, t_pvalue4, t_pvalue5)
## #1a. t-test pvalue: 0.0976543942567185
##  #2a. t-test pvalue: 0.52498013961145
##  #3a. t-test pvalue: 0.195192597999423
##  #4a. t-test pvalue: 0.174618728891541
##  #4b. t-test pvalue: 0.0309048607751814
  • Perform Permutational Multivariate Analysis of Variance (PERMANOVA) test for beta diversity difference among communities
    • for fecal pellet:
wunifrac_dist <- read_qza(paste0("asv/dada2/filter/", proj, "-weighted_unifrac_distance_matrix_transgene_fecal_PicoLab_Rodent_Diet.qza"))
wu <- wunifrac_dist$data
## metadata has the SampleID and the groups to compare in one column, make sure the order aligns between the metadata and the distance matrix.
dist_toTest <- usedist::dist_subset(wu, Fcomp1$SampleID)
res_permanova <- vegan::adonis(formula = dist_toTest ~ Mouse_background, data = Fcomp1)
Fcomp1_permanova <- paste0("#1b. PERMANOVA pvalue: ", res_permanova$aov.tab$`Pr(>F)`[1], "\n")


wunifrac_dist <- read_qza(paste0("asv/dada2/filter/", proj, "-weighted_unifrac_distance_matrix_iron_deficiency_fecal.qza"))
wu <- wunifrac_dist$data
## metadata has the SampleID and the groups to compare in one column, make sure the order aligns between the metadata and the distance matrix.
dist_toTest <- usedist::dist_subset(wu, Fcomp2$SampleID)
res_permanova <- vegan::adonis(formula = dist_toTest ~ Diet_Or_Water_treatment, data = Fcomp2)
Fcomp2_permanova <- paste0("#2b. PERMANOVA pvalue: ", res_permanova$aov.tab$`Pr(>F)`[1], "\n")


wunifrac_dist <- read_qza(paste0("asv/dada2/filter/", proj,
"-weighted_unifrac_distance_matrix_DCA_fecal_uninfected.qza"))
wu <- wunifrac_dist$data
## metadata has the SampleID and the groups to compare in one column, make sure the order aligns between the metadata and the distance matrix.
dist_toTest <- usedist::dist_subset(wu, Fcomp3$SampleID)
res_permanova <- vegan::adonis(formula = dist_toTest ~ Diet_Or_Water_treatment, data = Fcomp3)
Fcomp3_permanova <- paste0("#3b. PERMANOVA pvalue: ", res_permanova$aov.tab$`Pr(>F)`[1], "\n")


wunifrac_dist <- read_qza(paste0("asv/dada2/filter/", proj,
"-weighted_unifrac_distance_matrix_infection_fecal_H20.qza"))
wu <- wunifrac_dist$data
## metadata has the SampleID and the groups to compare in one column, make sure the order aligns between the metadata and the distance matrix.
dist_toTest <- usedist::dist_subset(wu, Fcomp4$SampleID)
res_permanova <- vegan::adonis(formula = dist_toTest ~ Infection, data = Fcomp4)
Fcomp4_permanova <- paste0("#4c. PERMANOVA pvalue: ", res_permanova$aov.tab$`Pr(>F)`[1], "\n")

wunifrac_dist <- read_qza(paste0("asv/dada2/filter/", proj,
"-weighted_unifrac_distance_matrix_infection_fecal_DCA.qza"))
wu <- wunifrac_dist$data
## metadata has the SampleID and the groups to compare in one column, make sure the order aligns between the metadata and the distance matrix.
dist_toTest <- usedist::dist_subset(wu, Fcomp5$SampleID)
res_permanova <- vegan::adonis(formula = dist_toTest ~ Infection, data = Fcomp5)
Fcomp5_permanova <- paste0("#4d. PERMANOVA pvalue: ", res_permanova$aov.tab$`Pr(>F)`[1], "\n")

cat(Fcomp1_permanova, Fcomp2_permanova, Fcomp3_permanova, Fcomp4_permanova, Fcomp5_permanova)
## #1b. PERMANOVA pvalue: 0.003
##  #2b. PERMANOVA pvalue: 0.003
##  #3b. PERMANOVA pvalue: 0.149
##  #4c. PERMANOVA pvalue: 0.336
##  #4d. PERMANOVA pvalue: 0.05
  • for gastric tissue:
wunifrac_dist <- read_qza(paste0("asv/dada2/filter/", proj, "-weighted_unifrac_distance_matrix_transgene_gastric_PicoLab_Rodent_Diet.qza"))
wu <- wunifrac_dist$data
## metadata has the SampleID and the groups to compare in one column, make sure the order aligns between the metadata and the distance matrix.
dist_toTest <- usedist::dist_subset(wu, Gcomp1$SampleID)
res_permanova <- vegan::adonis(formula = dist_toTest ~ Mouse_background, data = Gcomp1)
Gcomp1_permanova <- paste0("#1a. PERMANOVA pvalue: ", res_permanova$aov.tab$`Pr(>F)`[1], "\n")


wunifrac_dist <- read_qza(paste0("asv/dada2/filter/", proj, "-weighted_unifrac_distance_matrix_iron_deficiency_gastric.qza"))
wu <- wunifrac_dist$data
## metadata has the SampleID and the groups to compare in one column, make sure the order aligns between the metadata and the distance matrix.
dist_toTest <- usedist::dist_subset(wu, Gcomp2$SampleID)
res_permanova <- vegan::adonis(formula = dist_toTest ~ Diet_Or_Water_treatment, data = Gcomp2)
Gcomp2_permanova <- paste0("#2a. PERMANOVA pvalue: ", res_permanova$aov.tab$`Pr(>F)`[1], "\n")


wunifrac_dist <- read_qza(paste0("asv/dada2/filter/", proj,
"-weighted_unifrac_distance_matrix_DCA_gastric_uninfected.qza"))
wu <- wunifrac_dist$data
## metadata has the SampleID and the groups to compare in one column, make sure the order aligns between the metadata and the distance matrix.
dist_toTest <- usedist::dist_subset(wu, Gcomp3$SampleID)
res_permanova <- vegan::adonis(formula = dist_toTest ~ Diet_Or_Water_treatment, data = Gcomp3)
Gcomp3_permanova <- paste0("#3a. PERMANOVA pvalue: ", res_permanova$aov.tab$`Pr(>F)`[1], "\n")


wunifrac_dist <- read_qza(paste0("asv/dada2/filter/", proj,
"-weighted_unifrac_distance_matrix_infection_gastric_H20.qza"))
wu <- wunifrac_dist$data
## metadata has the SampleID and the groups to compare in one column, make sure the order aligns between the metadata and the distance matrix.
dist_toTest <- usedist::dist_subset(wu, Gcomp4$SampleID)
res_permanova <- vegan::adonis(formula = dist_toTest ~ Infection, data = Gcomp4)
Gcomp4_permanova <- paste0("#4a. PERMANOVA pvalue: ", res_permanova$aov.tab$`Pr(>F)`[1], "\n")

wunifrac_dist <- read_qza(paste0("asv/dada2/filter/", proj,
"-weighted_unifrac_distance_matrix_infection_gastric_DCA.qza"))
wu <- wunifrac_dist$data
## metadata has the SampleID and the groups to compare in one column, make sure the order aligns between the metadata and the distance matrix.
dist_toTest <- usedist::dist_subset(wu, Gcomp5$SampleID)
res_permanova <- vegan::adonis(formula = dist_toTest ~ Infection, data = Gcomp5)
Gcomp5_permanova <- paste0("#4b. PERMANOVA pvalue: ", res_permanova$aov.tab$`Pr(>F)`[1], "\n")

cat(Gcomp1_permanova, Gcomp2_permanova, Gcomp3_permanova, Gcomp4_permanova, Gcomp5_permanova)
## #1a. PERMANOVA pvalue: 0.022
##  #2a. PERMANOVA pvalue: 0.114
##  #3a. PERMANOVA pvalue: 0.029
##  #4a. PERMANOVA pvalue: 0.2
##  #4b. PERMANOVA pvalue: 0.027
  • Plotting PCoA based on beta diversity matrices
    • PCA for fecal pellet:
wunifrac_pcoa <- read_qza(paste0("asv/diversity/core-metrics-results/", proj, "-weighted-unifrac-pcoa-results.qza"))

PCs <- wunifrac_pcoa$data$Vectors %>% dplyr::select(SampleID, PC1, PC2)

# pdf("b_diversity_wunifrac_PCoA_Fecal.pdf", 5, 4)

PCs %>% right_join(Fcomp1) %>%
  ggplot(aes(x=PC1, y=PC2, color=Mouse_background, size=shannon)) +
  geom_point(alpha=0.8) + #alpha controls transparency and helps when points are overlapping
  theme_q2r() +
  scale_size_continuous(name="Shannon Diversity") +
  scale_color_discrete(name="Mouse_background")

PCs %>% right_join(Fcomp2) %>%
  ggplot(aes(x=PC1, y=PC2, color=Diet_Or_Water_treatment, size=shannon)) +
  geom_point(alpha=0.8) + #alpha controls transparency and helps when points are overlapping
  theme_q2r() +
  scale_size_continuous(name="Shannon Diversity") +
  scale_color_discrete(name="Iron Supply")

PCs %>% right_join(Fcomp3) %>%
  ggplot(aes(x=PC1, y=PC2, color=Diet_Or_Water_treatment, size=shannon)) +
  geom_point(alpha=0.8) + #alpha controls transparency and helps when points are overlapping
  theme_q2r() +
  scale_size_continuous(name="Shannon Diversity") +
  scale_color_discrete(name="Water Supply")

PCs %>% right_join(Fcomp4) %>%
  ggplot(aes(x=PC1, y=PC2, color=Infection, size=shannon)) +
  geom_point(alpha=0.8) + #alpha controls transparency and helps when points are overlapping
  theme_q2r() +
  scale_size_continuous(name="Shannon Diversity") +
  scale_color_discrete(name="Infection")

PCs %>% right_join(Fcomp5) %>%
  ggplot(aes(x=PC1, y=PC2, color=Infection, size=shannon)) +
  geom_point(alpha=0.8) + #alpha controls transparency and helps when points are overlapping
  theme_q2r() +
  scale_size_continuous(name="Shannon Diversity") +
  scale_color_discrete(name="Infection")

# dev.off()
  • PCA for gastirc tissue:
wunifrac_pcoa <- read_qza(paste0("asv/diversity/core-metrics-results/", proj, "-weighted-unifrac-pcoa-results.qza"))

PCs <- wunifrac_pcoa$data$Vectors %>% dplyr::select(SampleID, PC1, PC2)

# pdf("b_diversity_wunifrac_PCoA_Gastric.pdf", 5, 4)

PCs %>% right_join(Gcomp1) %>%
  ggplot(aes(x=PC1, y=PC2, color=Mouse_background, size=shannon)) +
  geom_point(alpha=0.8) + #alpha controls transparency and helps when points are overlapping
  theme_q2r() +
  scale_size_continuous(name="Shannon Diversity") +
  scale_color_discrete(name="Mouse_background")

PCs %>% right_join(Gcomp2) %>%
  ggplot(aes(x=PC1, y=PC2, color=Diet_Or_Water_treatment, size=shannon)) +
  geom_point(alpha=0.8) + #alpha controls transparency and helps when points are overlapping
  theme_q2r() +
  scale_size_continuous(name="Shannon Diversity") +
  scale_color_discrete(name="Iron Supply")

PCs %>% right_join(Gcomp3) %>%
  ggplot(aes(x=PC1, y=PC2, color=Diet_Or_Water_treatment, size=shannon)) +
  geom_point(alpha=0.8) + #alpha controls transparency and helps when points are overlapping
  theme_q2r() +
  scale_size_continuous(name="Shannon Diversity") +
  scale_color_discrete(name="Water Supply")

PCs %>% right_join(Gcomp4) %>%
  ggplot(aes(x=PC1, y=PC2, color=Infection, size=shannon)) +
  geom_point(alpha=0.8) + #alpha controls transparency and helps when points are overlapping
  theme_q2r() +
  scale_size_continuous(name="Shannon Diversity") +
  scale_color_discrete(name="Infection")

PCs %>% right_join(Gcomp5) %>%
  ggplot(aes(x=PC1, y=PC2, color=Infection, size=shannon)) +
  geom_point(alpha=0.8) + #alpha controls transparency and helps when points are overlapping
  theme_q2r() +
  scale_size_continuous(name="Shannon Diversity") +
  scale_color_discrete(name="Infection")

# dev.off()
  • Plotting a Heatmap for taxonomy

  • Making a taxonomic barplot
# filter out samples with all 0 values
taxasums <- taxasums %>% select_if(~ !is.numeric(.) || sum(.) != 0)

taxa_barplot(taxasums, metadata, "Sample_type")

taxa_barplot(taxasums, metadata, "Mouse_background")

taxa_barplot(taxasums, metadata, "Infection")

taxa_barplot(taxasums, metadata, "Diet_Or_Water_treatment")

  • Differential Abundance Analysis (Aldex2 method) - Volcano plot Expected Benjamini-Hochberg corrected P value of Welch’s t test was performed, p value<0.1 were shown as red dots
# set cutoff we.eBH<0.1
Pcutoff=0.1

ASVs <- read_qza(paste0("asv/dada2/",proj,"-asv-table.qza"))$data

differentials_transgene_gastric_PicoLab_Rodent_Diet <- read_qza(paste0("asv/aldex2/differentials_transgene_gastric_PicoLab_Rodent_Diet/", proj, "-differentials.qza"))$data

differentials_transgene_fecal_PicoLab_Rodent_Diet <- read_qza(paste0("asv/aldex2/differentials_transgene_fecal_PicoLab_Rodent_Diet/", proj, "-differentials.qza"))$data

differentials_iron_deficiency_gastric <- read_qza(paste0("asv/aldex2/differentials_iron_deficiency_gastric/", proj, "-differentials.qza"))$data

differentials_iron_deficiency_fecal <- read_qza(paste0("asv/aldex2/differentials_iron_deficiency_fecal/", proj, "-differentials.qza"))$data

differentials_DCA_gastric_uninfected <- read_qza(paste0("asv/aldex2/differentials_DCA_gastric_uninfected/", proj, "-differentials.qza"))$data

differentials_DCA_fecal_uninfected <- read_qza(paste0("asv/aldex2/differentials_DCA_fecal_uninfected/", proj, "-differentials.qza"))$data

differentials_infection_gastric_H20 <- read_qza(paste0("asv/aldex2/differentials_infection_gastric_H20/", proj, "-differentials.qza"))$data

differentials_infection_gastric_DCA <- read_qza(paste0("asv/aldex2/differentials_infection_gastric_DCA/", proj, "-differentials.qza"))$data

differentials_infection_fecal_H20 <- read_qza(paste0("asv/aldex2/differentials_infection_fecal_H20/", proj, "-differentials.qza"))$data

differentials_infection_fecal_DCA <- read_qza(paste0("asv/aldex2/differentials_infection_fecal_DCA/", proj, "-differentials.qza"))$data

differentials_4groups_gastric <- read_qza(paste0("asv/aldex2/differentials_4groups_gastric/", proj, "-differentials.qza"))$data

differentials_4groups_fecal <- read_qza(paste0("asv/aldex2/differentials_4groups_fecal/", proj, "-differentials.qza"))$data

taxonomy <- read_qza(paste0("asv/taxonomy/", proj, "-taxonomy.qza"))$data
tree <- read_qza(paste0("asv/phylogeny/", proj, "-rooted_tree.qza"))$data
  1. How does the gastrin transgene effect the gastric and intestinal microbiota?
  1. Gastric samples: compare 14.1 G-14.9 G (uninfected WT FVBN mice) vs. 14.10 G-14.14 G (uninfected INS-GAS mice with gastrin transgene).
## number of significantly changed taxa: 1
##   log2FC    q-value
## 1 9.9766 0.05559636
##                                                                                                     Taxon
## 1 k__Bacteria; p__Firmicutes; c__Bacilli; o__Turicibacterales; f__Turicibacteraceae; g__Turicibacter; s__

  1. Fecal samples: compare 14.1 F-14.9 F (uninfected WT FVBN mice) vs. 14.10 F-14.14 F (uninfected INS-GAS mice with gastrin transgene).
## number of significantly changed taxa: 16
##        log2FC      q-value
## 1   13.699216 0.0005407524
## 2   13.905920 0.0010027803
## 3    9.325503 0.0408352107
## 4    1.230751 0.0261901206
## 5    8.406816 0.0051649611
## 6    4.523676 0.0925379593
## 7    1.655063 0.0751760076
## 8    8.751153 0.0049225773
## 9   11.194655 0.0156877468
## 10 -11.774863 0.0400461573
## 11   9.110576 0.0040563797
## 12 -10.119853 0.0806550201
## 13 -10.113836 0.0693734726
## 14   4.313235 0.0939859903
## 15  -9.003194 0.0650795308
## 16  -8.195831 0.0833762656
##                                                                                                                                Taxon
## 1                                        k__Bacteria; p__Bacteroidetes; c__Bacteroidia; o__Bacteroidales; f__Rikenellaceae; g__; s__
## 2                      k__Bacteria; p__Tenericutes; c__Mollicutes; o__Anaeroplasmatales; f__Anaeroplasmataceae; g__Anaeroplasma; s__
## 3                            k__Bacteria; p__Firmicutes; c__Bacilli; o__Turicibacterales; f__Turicibacteraceae; g__Turicibacter; s__
## 4                                                k__Bacteria; p__Bacteroidetes; c__Bacteroidia; o__Bacteroidales; f__S24-7; g__; s__
## 5                                                k__Bacteria; p__Bacteroidetes; c__Bacteroidia; o__Bacteroidales; f__S24-7; g__; s__
## 6                                                k__Bacteria; p__Bacteroidetes; c__Bacteroidia; o__Bacteroidales; f__S24-7; g__; s__
## 7           k__Bacteria; p__Proteobacteria; c__Deltaproteobacteria; o__Desulfovibrionales; f__Desulfovibrionaceae; g__Bilophila; s__
## 8                                                    k__Bacteria; p__Firmicutes; c__Clostridia; o__Clostridiales; f__Lachnospiraceae
## 9                                                     k__Bacteria; p__Proteobacteria; c__Alphaproteobacteria; o__RF32; f__; g__; s__
## 10                     k__Bacteria; p__Tenericutes; c__Mollicutes; o__Anaeroplasmatales; f__Anaeroplasmataceae; g__Anaeroplasma; s__
## 11                                               k__Bacteria; p__Bacteroidetes; c__Bacteroidia; o__Bacteroidales; f__S24-7; g__; s__
## 12 k__Bacteria; p__Deferribacteres; c__Deferribacteres; o__Deferribacterales; f__Deferribacteraceae; g__Mucispirillum; s__schaedleri
## 13                                                                                                                       k__Bacteria
## 14                                               k__Bacteria; p__Bacteroidetes; c__Bacteroidia; o__Bacteroidales; f__S24-7; g__; s__
## 15                                                    k__Bacteria; p__Bacteroidetes; c__Bacteroidia; o__Bacteroidales; f__; g__; s__
## 16                                                                       k__Bacteria; p__Firmicutes; c__Clostridia; o__Clostridiales

  1. How does iron deficiency effect the gastric and intestinal microbiota?
  1. Gastric samples: compare 14.15 G-14.19 G (uninfected INS-GAS mice on iron-replete diet) vs. 14.20 G-14.26 G (uninfected INS-GAS mice on iron-depleted diet).
## number of significantly changed taxa: 3
##       log2FC    q-value
## 1  -9.375134 0.03015816
## 2 -11.481620 0.02818266
## 3 -11.099921 0.03223550
##                                                                                                                                 Taxon
## 1 k__Bacteria; p__Verrucomicrobia; c__Verrucomicrobiae; o__Verrucomicrobiales; f__Verrucomicrobiaceae; g__Akkermansia; s__muciniphila
## 2                                     k__Bacteria; p__Firmicutes; c__Clostridia; o__Clostridiales; f__Peptostreptococcaceae; g__; s__
## 3                                     k__Bacteria; p__Firmicutes; c__Clostridia; o__Clostridiales; f__Peptostreptococcaceae; g__; s__

  1. Fecal samples: compare 14.15 F-14.19 F (uninfected INS-GAS mice on iron-replete diet) vs. 14.20 F-14.26 F (uninfected INS-GAS mice on iron-depleted diet).
## number of significantly changed taxa: 11
##        log2FC     q-value
## 1  -16.207116 0.001389867
## 2   16.047979 0.012022007
## 3   13.091172 0.022666083
## 4   -7.794630 0.086415169
## 5   -1.090135 0.038824655
## 6   -8.653676 0.016371031
## 7  -11.379194 0.006250233
## 8   -1.793053 0.036625401
## 9  -10.616931 0.009127430
## 10   9.436136 0.050834965
## 11  -6.951504 0.093878169
##                                                                                                                                  Taxon
## 1  k__Bacteria; p__Verrucomicrobia; c__Verrucomicrobiae; o__Verrucomicrobiales; f__Verrucomicrobiaceae; g__Akkermansia; s__muciniphila
## 2                                                       k__Bacteria; p__Bacteroidetes; c__Bacteroidia; o__Bacteroidales; f__; g__; s__
## 3                  k__Bacteria; p__Bacteroidetes; c__Bacteroidia; o__Bacteroidales; f__Bacteroidaceae; g__Bacteroides; s__acidifaciens
## 4                                                  k__Bacteria; p__Bacteroidetes; c__Bacteroidia; o__Bacteroidales; f__S24-7; g__; s__
## 5                                                      k__Bacteria; p__Firmicutes; c__Clostridia; o__Clostridiales; f__Lachnospiraceae
## 6                                                      k__Bacteria; p__Firmicutes; c__Clostridia; o__Clostridiales; f__Lachnospiraceae
## 7                                      k__Bacteria; p__Firmicutes; c__Clostridia; o__Clostridiales; f__Peptostreptococcaceae; g__; s__
## 8                                                                          k__Bacteria; p__Firmicutes; c__Clostridia; o__Clostridiales
## 9                                      k__Bacteria; p__Firmicutes; c__Clostridia; o__Clostridiales; f__Peptostreptococcaceae; g__; s__
## 10                                                 k__Bacteria; p__Bacteroidetes; c__Bacteroidia; o__Bacteroidales; f__S24-7; g__; s__
## 11                                                     k__Bacteria; p__Firmicutes; c__Clostridia; o__Clostridiales; f__Lachnospiraceae

  1. What effect does DCA have on the gastric and intestinal microbiota?
    1. Gastric samples: compare 16.1 G – 16.5 G (uninfected INS-GAS mice given water alone) vs. 16.6 G – 16.10 G (uninfected INS-GAS mice give water supplemented with 100 uM DCA).
## number of significantly changed taxa: 0
## [1] log2FC  q-value Taxon  
## <0 rows> (or 0-length row.names)

b.Fecal samples: compare 16.1 F – 16.5 F (uninfected INS-GAS mice given water alone) vs. 16.6 F – 16.10 F (uninfected INS-GAS mice given water supplemented with 100 uM DCA).

## number of significantly changed taxa: 0
## [1] log2FC  q-value Taxon  
## <0 rows> (or 0-length row.names)

  1. What effect does H. pylori have on the gastric and intestinal microbiota? (NOTE: some of these animals we were unable to culture back H. pylori. You may be able to see if it’s worth including in the comparisons if you don’t see Helicobacter 16S sequences in your analysis).
    1. Gastric samples: compare 16.1 G – 16.5 G (uninfected INS-GAS mice given water alone) vs. 16.11 G – 16.15 G (H. pylori infected INS-GAS mice given water alone)
## number of significantly changed taxa: 0
## [1] log2FC  q-value Taxon  
## <0 rows> (or 0-length row.names)

  1. Gastric samples: compare 16.6 G- 16.10 G (uninfected INS-GAS mice give water supplemented with 100 uM DCA) vs. 16.16 G – 16.20 G (H. pylori infected INS-GAS mice give water supplemented with 100 uM DCA).
## number of significantly changed taxa: 0
## [1] log2FC  q-value Taxon  
## <0 rows> (or 0-length row.names)

  1. Fecal samples: compare 16.1 F – 16.5 F (uninfected INS-GAS mice given water alone) vs. 16.11 F – 16.15 F (H. pylori infected INS-GAS mice given water alone)
## number of significantly changed taxa: 0
## [1] log2FC  q-value Taxon  
## <0 rows> (or 0-length row.names)

d. Fecal samples: compare 16.6 F- 16.10 F (uninfected INS-GAS mice give water supplemented with 100 uM DCA) vs. 16.16 F – 16.20 F (H. pylori infected INS-GAS mice give water supplemented with 100 uM DCA).
## number of significantly changed taxa: 0
## [1] log2FC  q-value Taxon  
## <0 rows> (or 0-length row.names)

  1. Overall differences in the gastric among the 4 groups: a. 16.1 G -16.5 G (uninfected INS-GAS mice given water alone) b. 16.6 G- 16.10 G (uninfected INS-GAS mice give water supplemented with 100 uM DCA) c. 16.11 G – 16.15 G (H. pylori infected INS-GAS mice given water alone)
    1. 16.16 G – 16.20 G (H. pylori infected INS-GAS mice give water supplemented with 100 uM DCA)
## number of significantly changed taxa: 0
## [1] log2FC  q-value Taxon  
## <0 rows> (or 0-length row.names)

  1. Overall differences in the intestinal microbiota in the 4 groups: a. 16.1 F -16.5 F (uninfected INS-GAS mice given water alone) b. 16.6 F- 16.10 F (uninfected INS-GAS mice give water supplemented with 100 uM DCA) c. 16.11 F – 16.15 F (H. pylori infected INS-GAS mice given water alone)
    1. 16.16 F – 16.20 F (H. pylori infected INS-GAS mice give water supplemented with 100 uM DCA)
## number of significantly changed taxa: 0
## [1] log2FC  q-value Taxon  
## <0 rows> (or 0-length row.names)